package com.flashflexpro.flexdirector.adapter.codec {
	
import com.flashflexpro.flexdirector.adapter.descriptor.DescPropertyAuto;
import com.flashflexpro.flexdirector.model.CodeStringValue;

import mx.automation.IAutomationObject;

public interface ICodec {

    /**
     * RETURNS ARE ALWAYS AS3 CODE !!!
     * return as3 code in string "[ 1, 2, 3 ]", and the decode function should be simple;
     * otherwise return a string in AS3 code, like "\"strings needed to be decoded\"" ( which is too difficult to read or modify)
     * @param obj
     * @param descProperty
     * @param relativeParent
     * @return
     */
    function encode( obj:Object, descProperty:DescPropertyAuto, relativeParent:IAutomationObject ):CodeStringValue;
    
    function decode( obj:Object, value:Object, descProperty:DescPropertyAuto, relativeParent:IAutomationObject, inString:Boolean=false ):void;
}
}